Add support for disabling tradfri groups#7593
Conversation
|
@cnrd, thanks for your PR! By analyzing the history of the files in this pull request, we identified @ggravlingen, @balloob and @fabaff to be potential reviewers. |
| return True | ||
|
|
||
| return (yield from _setup_gateway(hass, config, host, key)) | ||
| return (yield from _setup_gateway(hass, config, host, key, allow_tradfri_groups)) |
There was a problem hiding this comment.
line too long (85 > 79 characters)
|
|
||
| if host in keys: | ||
| yield from _setup_gateway(hass, config, host, keys[host]['key']) | ||
| yield from _setup_gateway(hass, config, host, keys[host]['key'], allow_tradfri_groups) |
There was a problem hiding this comment.
line too long (98 > 79 characters)
| vol.Inclusive(CONF_HOST, 'gateway'): cv.string, | ||
| vol.Inclusive(CONF_API_KEY, 'gateway'): cv.string, | ||
| vol.Optional(CONF_ALLOW_TRADFRI_GROUPS, | ||
| default=DEFAULT_ALLOW_TRADFRI_GROUPS): cv.boolean, |
There was a problem hiding this comment.
continuation line under-indented for visual indent
|
What's the usecase of this addition? |
|
Same usecase as in the Hue Component (https://home-assistant.io/components/light.hue/): The documentation should probably just be: |
|
But what's the benefit of not adding the group as an entity? |
|
Not having to deal with Emulated Hue and/or Homebridge automatically importing them. Yes I know it is possible to disable this on the individual groups, by adding them in customization.yaml, but I would rather they did not get added as entities at all. I'm not completely sure, but I think that it is not required to add groups in Hue, but in Tradfri it is required to have at least one group, that is used to add other devices. That is my usecase for disabling the groups, but I know that some people may want to use them, which is why the default is that groups are added as entities, this change just gives people the option to actively disable them. |
|
Hey guys, a HA beginner here.. Got to to agree that the groups are kind off unnecessary. Got about 15 units and the only reason for me to have groups is in the setup of TRÅDFRI gateway for the first time. Sins it is a needed to pair with the remotes with the lamps. |
balloob
left a comment
There was a problem hiding this comment.
I think this is a good addition and the code looks 👍 🐬
|
@MartinHjelmare I think the addition makes sense. That way there are less entities to fetch data from. |
Description:
Related issue (if applicable): fixes #
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#2632
Example entry for
configuration.yaml(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
toxrun successfully. Your PR cannot be merged unless tests pass